package com.balakitbbs.intercept;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Service;
@Service
public class StartupListener implements ApplicationListener<ContextRefreshedEvent>{
	@Override
    public void onApplicationEvent(ContextRefreshedEvent evt) {
        if (evt.getApplicationContext().getParent() == null) {
        	System.out.println("------------项目启动-------------");
        }
    }

}
